package com.yhally.seata.storage.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yhally.seata.storage.domain.Storage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
 *
 * @author wangyu
 * @version 1.0
 * @date 2022/5/6 23:00
 */
@Mapper
public interface StorageDao extends BaseMapper<Storage> {

    /**
     * <p>描述: 扣减库存
     * <p>开发者: wangyu
     * <p>时间: 2022/5/8 22:16
     *
     * @param productId
     * @param count
     * @return int
     */
    int decrease(@Param("productId") Long productId, @Param("count") Integer count);

}
